#include<vector>
#include<boost\tuple\tuple.hpp>

struct Point
{
	double x;
	double y;
	unsigned int index;

	Point &operator = (const Point &p)
	{
		x = p.x;
		y = p.y;
		index = p.index;
		return *this;
	}
	bool operator == (const Point &p) const
	{
		if(x == p.x && y == p.y && index == p.index)
			return true;
		return false;
	}

	bool operator != (const Point &p) const
	{
		if(x == p.x && y == p.y && index == p.index)
			return false;
		return true;
	}

};


struct Edge
{
	Point start;
	Point next;

	Edge &operator = (const Edge &e)
	{
		start = e.start;
		next = e.next;
		return *this;
	}


	bool operator== (const Edge &e) const
	{
		if(((start == e.start) && (next == e.next)) || ((start == e.next) && (next == e.start)))
			return true;
		else 
			return false;
	}

	bool operator!= (const Edge &e) const
	{
		if(((start == e.start) && (next == e.next)) || ((start == e.next) && (next == e.start)))
			return false;
		else 
			return true;
	}
};

struct Triangle
{
	Point start;
	Point next;
	Point end;
};

std::vector<boost::tuple<unsigned int, unsigned int, unsigned int>> triangulation(const std::vector<std::pair<double, double>>& vInput);